<!--
 * @Description:
 * @Author bianpengfei
 * @create 2022/11/8 22:17
 -->
<template>
  <el-dialog
    v-if="_visible"
    :visible.sync="_visible"
    append-to-body
    width="550px"
    :title="'日志详情'"
    top="50px"
    custom-class="el-dialog--xbm2o0s98"
    :close-on-click-modal="false"
  >
    <div class="py-4px">
      <!-- 新增     -->
      <el-descriptions :column="1" size="small" border>
        <el-descriptions-item>
          <template slot="label"> 记录时间</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 操作人员</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 所属部门</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 接口名称</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 请求参数</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 操作人角色</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 日志级别</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>

        <el-descriptions-item>
          <template slot="label"> 请求时长</template>
          <span class="text-13px text-[#8c8c8c]">2021-11-06 10:55:02</span>
        </el-descriptions-item>
      </el-descriptions>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    },

    model: {
      type: [String, Number],
      default: 1 // 1 新增 2 编辑
    }
  },

  data() {
    return {
      form: {
        title: '',
        content: ''
      }
    }
  },

  computed: {
    _title() {
      const conf = {
        1: '新增用户',
        2: '编辑用户'
      }
      return conf[String(this.model)]
    },

    _visible: {
      get() {
        return this.visible
      },
      set(val) {
        this.$emit('update:visible', val)
      }
    }
  },

  watch: {},

  created() {},

  mounted() {
    this.$once('hook:beforeDestroy', () => {
      // this.removeEvents()
    })
  },

  methods: {
    onReset() {
      this.form = {
        ...this.form,
        title: '',
        content: ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.page {
}
</style>

<style lang="scss">
.el-dialog--xbm2o0s98 {
  .el-descriptions {
    .el-descriptions__body {
      .el-descriptions-item__label {
        color: #000;
        font-size: 13px;
      }
    }
  }
}
</style>
